package com.star.system.struct;

import com.star.system.dto.RoleSaveDTO;
import com.star.system.dto.RoleUpdateDTO;
import com.star.system.entity.Role;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author yangzj
 */
@Mapper
public interface RoleStruct {
    RoleStruct INSTANCE = Mappers.getMapper(RoleStruct.class);


    /**
     * to Role
     *
     * @param dto dto
     * @return {@link Role}
     */
    Role to(RoleSaveDTO dto);

    /**
     * to Role
     *
     * @param dto dto
     * @return {@link Role}
     */
    Role to(RoleUpdateDTO dto);
}
